Optimal. Leaf size=43 \[ -\frac {\cos (2 a) \text {Ci}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2}+\frac {\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3506, 3459,
3457, 3456} \begin {gather*} -\frac {\cos (2 a) \text {CosIntegral}\left (2 b x^n\right )}{2 n}+\frac {\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3456
Rule 3457
Rule 3459
Rule 3506
Rubi steps
\begin {align*} \int \frac {\sin ^2\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac {1}{2 x}-\frac {\cos \left (2 a+2 b x^n\right )}{2 x}\right ) \, dx\\ &=\frac {\log (x)}{2}-\frac {1}{2} \int \frac {\cos \left (2 a+2 b x^n\right )}{x} \, dx\\ &=\frac {\log (x)}{2}-\frac {1}{2} \cos (2 a) \int \frac {\cos \left (2 b x^n\right )}{x} \, dx+\frac {1}{2} \sin (2 a) \int \frac {\sin \left (2 b x^n\right )}{x} \, dx\\ &=-\frac {\cos (2 a) \text {Ci}\left (2 b x^n\right )}{2 n}+\frac {\log (x)}{2}+\frac {\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 37, normalized size = 0.86 \begin {gather*} \frac {-\cos (2 a) \text {Ci}\left (2 b x^n\right )+n \log (x)+\sin (2 a) \text {Si}\left (2 b x^n\right )}{2 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 40, normalized size = 0.93
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (b \,x^{n}\right )}{2}+\frac {\sinIntegral \left (2 b \,x^{n}\right ) \sin \left (2 a \right )}{2}-\frac {\cosineIntegral \left (2 b \,x^{n}\right ) \cos \left (2 a \right )}{2}}{n}\) | \(40\) |
default | \(\frac {\frac {\ln \left (b \,x^{n}\right )}{2}+\frac {\sinIntegral \left (2 b \,x^{n}\right ) \sin \left (2 a \right )}{2}-\frac {\cosineIntegral \left (2 b \,x^{n}\right ) \cos \left (2 a \right )}{2}}{n}\) | \(40\) |
risch | \(-\frac {i {\mathrm e}^{-2 i a} \pi \,\mathrm {csgn}\left (b \,x^{n}\right )}{4 n}+\frac {i {\mathrm e}^{-2 i a} \sinIntegral \left (2 b \,x^{n}\right )}{2 n}+\frac {{\mathrm e}^{-2 i a} \expIntegral \left (1, -2 i b \,x^{n}\right )}{4 n}+\frac {{\mathrm e}^{2 i a} \expIntegral \left (1, -2 i b \,x^{n}\right )}{4 n}+\frac {\ln \left (x \right )}{2}\) | \(80\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.44, size = 100, normalized size = 2.33 \begin {gather*} -\frac {{\left ({\rm Ei}\left (2 i \, b x^{n}\right ) + {\rm Ei}\left (-2 i \, b x^{n}\right ) + {\rm Ei}\left (2 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + {\rm Ei}\left (-2 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \cos \left (2 \, a\right ) - 4 \, n \log \left (x\right ) - {\left (-i \, {\rm Ei}\left (2 i \, b x^{n}\right ) + i \, {\rm Ei}\left (-2 i \, b x^{n}\right ) - i \, {\rm Ei}\left (2 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right ) + i \, {\rm Ei}\left (-2 i \, b e^{\left (n \overline {\log \left (x\right )}\right )}\right )\right )} \sin \left (2 \, a\right )}{8 \, n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 48, normalized size = 1.12 \begin {gather*} -\frac {\cos \left (2 \, a\right ) \operatorname {Ci}\left (2 \, b x^{n}\right ) + \cos \left (2 \, a\right ) \operatorname {Ci}\left (-2 \, b x^{n}\right ) - 2 \, n \log \left (x\right ) - 2 \, \sin \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x^{n}\right )}{4 \, n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sin ^{2}{\left (a + b x^{n} \right )}}{x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\sin \left (a+b\,x^n\right )}^2}{x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________